<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
      <el-form-item label="合同编号" prop="sfContractNo">
        <el-input
          v-model="queryParams.sfContractNo"
          placeholder="请输入合同编号"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="小区名(使用楼盘名称)" prop="premiseName">
        <el-input
          v-model="queryParams.premiseName"
          placeholder="请输入小区名(使用楼盘名称)"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="房东姓名" prop="ownerName">
        <el-input
          v-model="queryParams.ownerName"
          placeholder="请输入房东姓名"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="合同录入时间，" prop="conInfoTime">
        <el-date-picker clearable
                        v-model="queryParams.conInfoTime"
                        type="date"
                        value-format="yyyy-MM-dd"
                        placeholder="请选择合同录入时间，">
        </el-date-picker>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

<!--    <el-row :gutter="10" class="mb8">-->
<!--      <el-col :span="1.5">-->
<!--        <el-button-->
<!--          type="primary"-->
<!--          plain-->
<!--          icon="el-icon-plus"-->
<!--          size="mini"-->
<!--          @click="handleAdd"-->
<!--          v-hasPermi="['contract:contract:add']"-->
<!--        >新增</el-button>-->
<!--      </el-col>-->
<!--      <el-col :span="1.5">-->
<!--        <el-button-->
<!--          type="success"-->
<!--          plain-->
<!--          icon="el-icon-edit"-->
<!--          size="mini"-->
<!--          :disabled="single"-->
<!--          @click="handleUpdate"-->
<!--          v-hasPermi="['contract:contract:edit']"-->
<!--        >修改</el-button>-->
<!--      </el-col>-->
<!--      <el-col :span="1.5">-->
<!--        <el-button-->
<!--          type="danger"-->
<!--          plain-->
<!--          icon="el-icon-delete"-->
<!--          size="mini"-->
<!--          :disabled="multiple"-->
<!--          @click="handleDelete"-->
<!--          v-hasPermi="['contract:contract:remove']"-->
<!--        >删除</el-button>-->
<!--      </el-col>-->
<!--      <el-col :span="1.5">-->
<!--        <el-button-->
<!--          type="warning"-->
<!--          plain-->
<!--          icon="el-icon-download"-->
<!--          size="mini"-->
<!--          @click="handleExport"-->
<!--          v-hasPermi="['contract:contract:export']"-->
<!--        >导出</el-button>-->
<!--      </el-col>-->
<!--      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
<!--    </el-row>-->

    <el-table v-loading="loading" :data="contractList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center" />
<!--      <el-table-column label="主键id" align="center" prop="id" />-->
      <el-table-column label="租户名称" align="center" prop="signUserName" />
      <el-table-column label="合同编号" align="center" prop="sfContractNo" />
      <el-table-column label="租户人手机号" align="center" prop="signUserMobile" />
      <!--      <el-table-column label="上一合同ID，续约合同的时候" align="center" prop="lastContractId" />-->
      <!--      <el-table-column label="上一合同编号" align="center" prop="lastContractNo" />-->
      <!--      <el-table-column label="商户ID" align="center" prop="businessId" />-->
      <el-table-column label="小区名(使用楼盘名称)" align="center" prop="premiseName" />
      <!--      <el-table-column label="房产ID" align="center" prop="houseId" />-->
<!--      <el-table-column label="房源标题" align="center" prop="houseTitle" />-->
      <!--      <el-table-column label="房产证书编号" align="center" prop="houseZsNo" />-->
<!--      <el-table-column label="产权地址" align="center" prop="cqAddress" />-->
      <!--      <el-table-column label="房东ID" align="center" prop="ownerId" />-->
<!--      <el-table-column label="房东姓名" align="center" prop="ownerName" />-->
      <!--      <el-table-column label="房东证件号码" align="center" prop="ownerIdCard" />-->
<!--      <el-table-column label="房东手机号" align="center" prop="ownerMobile" />-->
<!--      <el-table-column label="租户名称" align="center" prop="signUserName" />-->
      <!--      <el-table-column label="租户人证件号" align="center" prop="signUserIdCard" />-->
<!--      <el-table-column label="租户人手机号" align="center" prop="signUserMobile" />-->
      <!--      <el-table-column label="租户紧急联系电话" align="center" prop="signUserEmergencyPhone" />-->
      <el-table-column label="租约期限开始时间" align="center" prop="leaseStartTime" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.leaseStartTime, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="租约期限结束时间" align="center" prop="leaseEndTime" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.leaseEndTime, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <!--      <el-table-column label="收房月租金" align="center" prop="monthRent" />-->
      <!--      <el-table-column label="房产押金" align="center" prop="depositMoney" />-->
<!--            <el-table-column label="支付方式" align="center" prop="depositType" />-->
      <!--      <el-table-column label="支付方式(押X付Y的Y）" align="center" prop="paymentType" />-->
      <!--      <el-table-column label="合同签订时间，" align="center" prop="conSignTime" width="180">-->
      <!--        <template slot-scope="scope">-->
      <!--          <span>{{ parseTime(scope.row.conSignTime, '{y}-{m}-{d}') }}</span>-->
      <!--        </template>-->
      <!--      </el-table-column>-->
<!--      <el-table-column label="合同录入时间，" align="center" prop="conInfoTime" width="180">-->
<!--        <template slot-scope="scope">-->
<!--          <span>{{ parseTime(scope.row.conInfoTime, '{y}-{m}-{d}') }}</span>-->
<!--        </template>-->
<!--      </el-table-column>-->
<!--      <el-table-column label="合同审核时间，" align="center" prop="conAudTime" width="180">-->
<!--        <template slot-scope="scope">-->
<!--          <span>{{ parseTime(scope.row.conAudTime, '{y}-{m}-{d}') }}</span>-->
<!--        </template>-->
<!--      </el-table-column>-->
      <!--      <el-table-column label="合同录入人" align="center" prop="operId" />-->
      <!--      <el-table-column label="收房人，" align="center" prop="sfUserId" />-->
      <!--      <el-table-column label="收房人姓名" align="center" prop="sfUserName" />-->
      <el-table-column label="合同状态" align="center" prop="status">
        <template slot-scope="scope">
          <span v-if="scope.row.status == 1">正常</span>
          <span v-if="scope.row.status == 2">已解约</span>
        </template>
      </el-table-column>
      <!--      <el-table-column label="续约状态" align="center" prop="xyStatus" />-->
<!--      <el-table-column label="是否收房贷" align="center" prop="sfLoanFlg">-->
<!--        <template slot-scope="scope">-->
<!--          <span v-if="scope.row.sfLoanFlg == 0">否</span>-->
<!--          <span v-if="scope.row.sfLoanFlg == 1">是</span>-->
<!--        </template>-->
<!--      </el-table-column>-->

      <!--      <el-table-column label="备注" align="center" prop="remark" />-->
      <!--      <el-table-column label="联系地址" align="center" prop="ownerAddress" />-->
      <!--      <el-table-column label="删除标识" align="center" prop="delFlg">-->
      <!--        <template slot-scope="scope">-->
      <!--          <span v-if="scope.row.delFlg == 0">未删除</span>-->
      <!--          <span v-if="scope.row.delFlg == 1">删除</span>-->
      <!--        </template>-->
      <!--      </el-table-column>-->
      <!--      <el-table-column label="创建用户ID" align="center" prop="createUserid" />-->
      <!--      <el-table-column label="更新用户ID" align="center" prop="updateUserid" />-->
      <!--      <el-table-column label="房产类型" align="center" prop="houseLeaseType">-->
      <!--        <template slot-scope="scope">-->
      <!--          <span v-if="scope.row.houseLeaseType == 1">合租</span>-->
      <!--          <span v-if="scope.row.houseLeaseType == 2">整租</span>-->
      <!--          <span v-if="scope.row.houseLeaseType == 3">公寓</span>-->
      <!--        </template>-->
      <!--      </el-table-column>-->

<!--      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<!--        <template slot-scope="scope">-->
<!--          <el-button-->
<!--            size="mini"-->
<!--            type="text"-->
<!--            icon="el-icon-edit"-->
<!--            @click="handleUpdate(scope.row)"-->
<!--            v-hasPermi="['contract:contract:edit']"-->
<!--          >修改</el-button>-->
<!--          <el-button-->
<!--            size="mini"-->
<!--            type="text"-->
<!--            icon="el-icon-delete"-->
<!--            @click="handleDelete(scope.row)"-->
<!--            v-hasPermi="['contract:contract:remove']"-->
<!--          >删除</el-button>-->
<!--          <el-button-->
<!--            size="mini"-->
<!--            type="text"-->
<!--            icon="el-icon-edit"-->
<!--            @click="getDownload(scope.$index,scope.row)"-->
<!--            v-hasPermi="['contract:contract:edit']"-->
<!--          >pdf导出</el-button>-->
<!--        </template>-->
<!--      </el-table-column>-->
    </el-table>
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />
    <!-- 添加或修改【请填写功能名称】对话框 -->
<!--    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>-->
<!--      <el-form ref="form" :model="form" :rules="rules" label-width="80px">-->
<!--        <el-form-item label="合同编号" prop="sfContractNo">-->
<!--          <el-input v-model="form.sfContractNo" placeholder="请输入合同编号" />-->
<!--        </el-form-item>-->
<!--        <el-form-item label="上一合同ID，续约合同的时候" prop="lastContractId">-->
<!--          <el-input v-model="form.lastContractId" placeholder="请输入上一合同ID，续约合同的时候" />-->
<!--        </el-form-item>-->
<!--        <el-form-item label="上一合同编号" prop="lastContractNo">-->
<!--          <el-input v-model="form.lastContractNo" placeholder="请输入上一合同编号" />-->
<!--        </el-form-item>-->
<!--        <el-form-item label="商户ID" prop="businessId">-->
<!--          <el-input v-model="form.businessId" placeholder="请输入商户ID" />-->
<!--        </el-form-item>-->
<!--        <el-form-item label="小区名(使用楼盘名称)" prop="premiseName">-->
<!--          <el-input v-model="form.premiseName" placeholder="请输入小区名(使用楼盘名称)" />-->
<!--        </el-form-item>-->
<!--        <el-form-item label="房产ID" prop="houseId">-->
<!--          <el-input v-model="form.houseId" placeholder="请输入房产ID" />-->
<!--        </el-form-item>-->
<!--        <el-form-item label="房源标题" prop="houseTitle">-->
<!--          <el-input v-model="form.houseTitle" placeholder="请输入房源标题" />-->
<!--        </el-form-item>-->
<!--        <el-form-item label="房产证书编号" prop="houseZsNo">-->
<!--          <el-input v-model="form.houseZsNo" placeholder="请输入房产证书编号" />-->
<!--        </el-form-item>-->
<!--        <el-form-item label="产权地址" prop="cqAddress">-->
<!--          <el-input v-model="form.cqAddress" placeholder="请输入产权地址" />-->
<!--        </el-form-item>-->
<!--        <el-form-item label="房东ID" prop="ownerId">-->
<!--          <el-input v-model="form.ownerId" placeholder="请输入房东ID" />-->
<!--        </el-form-item>-->
<!--        <el-form-item label="房东姓名" prop="ownerName">-->
<!--          <el-input v-model="form.ownerName" placeholder="请输入房东姓名" />-->
<!--        </el-form-item>-->
<!--        <el-form-item label="房东证件号码" prop="ownerIdCard">-->
<!--          <el-input v-model="form.ownerIdCard" placeholder="请输入房东证件号码" />-->
<!--        </el-form-item>-->
<!--        <el-form-item label="房东手机号" prop="ownerMobile">-->
<!--          <el-input v-model="form.ownerMobile" placeholder="请输入房东手机号" />-->
<!--        </el-form-item>-->
<!--        <el-form-item label="租户名称" prop="signUserName">-->
<!--          <el-input v-model="form.signUserName" placeholder="请输入租户名称" />-->
<!--        </el-form-item>-->
<!--        <el-form-item label="租户人证件号" prop="signUserIdCard">-->
<!--          <el-input v-model="form.signUserIdCard" placeholder="请输入租户人证件号" />-->
<!--        </el-form-item>-->
<!--        <el-form-item label="租户人手机号" prop="signUserMobile">-->
<!--          <el-input v-model="form.signUserMobile" placeholder="请输入租户人手机号" />-->
<!--        </el-form-item>-->
<!--        <el-form-item label="租户紧急联系电话" prop="signUserEmergencyPhone">-->
<!--          <el-input v-model="form.signUserEmergencyPhone" placeholder="请输入租户紧急联系电话" />-->
<!--        </el-form-item>-->
<!--        <el-form-item label="租约期限开始时间" prop="leaseStartTime">-->
<!--          <el-date-picker clearable-->
<!--                          v-model="form.leaseStartTime"-->
<!--                          type="date"-->
<!--                          value-format="yyyy-MM-dd"-->
<!--                          placeholder="请选择租约期限开始时间">-->
<!--          </el-date-picker>-->
<!--        </el-form-item>-->
<!--        <el-form-item label="租约期限结束时间" prop="leaseEndTime">-->
<!--          <el-date-picker clearable-->
<!--                          v-model="form.leaseEndTime"-->
<!--                          type="date"-->
<!--                          value-format="yyyy-MM-dd"-->
<!--                          placeholder="请选择租约期限结束时间">-->
<!--          </el-date-picker>-->
<!--        </el-form-item>-->
<!--        <el-form-item label="收房月租金" prop="monthRent">-->
<!--          <el-input v-model="form.monthRent" placeholder="请输入收房月租金" />-->
<!--        </el-form-item>-->
<!--        <el-form-item label="房产押金" prop="depositMoney">-->
<!--          <el-input v-model="form.depositMoney" placeholder="请输入房产押金" />-->
<!--        </el-form-item>-->
<!--        <el-form-item label="合同签订时间，" prop="conSignTime">-->
<!--          <el-date-picker clearable-->
<!--                          v-model="form.conSignTime"-->
<!--                          type="date"-->
<!--                          value-format="yyyy-MM-dd"-->
<!--                          placeholder="请选择合同签订时间，">-->
<!--          </el-date-picker>-->
<!--        </el-form-item>-->
<!--        <el-form-item label="合同录入时间，" prop="conInfoTime">-->
<!--          <el-date-picker clearable-->
<!--                          v-model="form.conInfoTime"-->
<!--                          type="date"-->
<!--                          value-format="yyyy-MM-dd"-->
<!--                          placeholder="请选择合同录入时间，">-->
<!--          </el-date-picker>-->
<!--        </el-form-item>-->
<!--        <el-form-item label="合同审核时间，" prop="conAudTime">-->
<!--          <el-date-picker clearable-->
<!--                          v-model="form.conAudTime"-->
<!--                          type="date"-->
<!--                          value-format="yyyy-MM-dd"-->
<!--                          placeholder="请选择合同审核时间，">-->
<!--          </el-date-picker>-->
<!--        </el-form-item>-->
<!--        <el-form-item label="合同录入人" prop="operId">-->
<!--          <el-input v-model="form.operId" placeholder="请输入合同录入人" />-->
<!--        </el-form-item>-->
<!--        <el-form-item label="收房人，" prop="sfUserId">-->
<!--          <el-input v-model="form.sfUserId" placeholder="请输入收房人，" />-->
<!--        </el-form-item>-->
<!--        <el-form-item label="收房人姓名" prop="sfUserName">-->
<!--          <el-input v-model="form.sfUserName" placeholder="请输入收房人姓名" />-->
<!--        </el-form-item>-->
<!--        <el-form-item label="是否收房贷,0:否 1:是" prop="sfLoanFlg">-->
<!--          <el-input v-model="form.sfLoanFlg" placeholder="请输入是否收房贷,0:否 1:是" />-->
<!--        </el-form-item>-->
<!--        <el-form-item label="备注" prop="remark">-->
<!--          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />-->
<!--        </el-form-item>-->
<!--        <el-form-item label="删除标识，0:未删除，1：删除" prop="delFlg">-->
<!--          <el-input v-model="form.delFlg" placeholder="请输入删除标识，0:未删除，1：删除" />-->
<!--        </el-form-item>-->
<!--        <el-form-item label="创建用户ID" prop="createUserid">-->
<!--          <el-input v-model="form.createUserid" placeholder="请输入创建用户ID" />-->
<!--        </el-form-item>-->
<!--        <el-form-item label="更新用户ID" prop="updateUserid">-->
<!--          <el-input v-model="form.updateUserid" placeholder="请输入更新用户ID" />-->
<!--        </el-form-item>-->
<!--      </el-form>-->
<!--      <div slot="footer" class="dialog-footer">-->
<!--        <el-button type="primary" @click="submitForm">确 定</el-button>-->
<!--        <el-button @click="cancel">取 消</el-button>-->
<!--      </div>-->
<!--    </el-dialog>-->
  </div>
</template>

<script>
  import {owner, listContract, getContract, delContract, addContract, updateContract } from "@/api/contract/contract";

  export default {
    name: "Contract",
    data() {
      return {
        // 表单校验
        rules: {
          sfContractNo: [
            { required: true, message: "合同编号不能为空", trigger: "blur" }
          ],
          businessId: [
            { required: true, message: "商户ID不能为空", trigger: "blur" }
          ],
          premiseName: [
            { required: true, message: "小区名(使用楼盘名称)不能为空", trigger: "blur" }
          ],
          houseId: [
            { required: true, message: "房产ID不能为空", trigger: "blur" }
          ],
          houseTitle: [
            { required: true, message: "房源标题不能为空", trigger: "blur" }
          ],
          ownerId: [
            { required: true, message: "房东ID不能为空", trigger: "blur" }
          ],
          ownerName: [
            { required: true, message: "房东姓名不能为空", trigger: "blur" }
          ],
          signUserName: [
            { required: true, message: "租户名称不能为空", trigger: "blur" }
          ],
          leaseStartTime: [
            { required: true, message: "租约期限开始时间不能为空", trigger: "blur" }
          ],
          leaseEndTime: [
            { required: true, message: "租约期限结束时间不能为空", trigger: "blur" }
          ],
          monthRent: [
            { required: true, message: "收房月租金不能为空", trigger: "blur" }
          ],
          depositType: [
            { required: true, message: "支付方式(押X付Y的X)不能为空", trigger: "change" }
          ],
          paymentType: [
            { required: true, message: "支付方式(押X付Y的Y）不能为空", trigger: "change" }
          ],
          operId: [
            { required: true, message: "合同录入人不能为空", trigger: "blur" }
          ],
          sfUserId: [
            { required: true, message: "收房人，不能为空", trigger: "blur" }
          ],
          sfUserName: [
            { required: true, message: "收房人姓名不能为空", trigger: "blur" }
          ],
          status: [
            { required: true, message: "合同状态不能为空", trigger: "blur" }
          ],
          xyStatus: [
            { required: true, message: "续约状态不能为空", trigger: "blur" }
          ],
          delFlg: [
            { required: true, message: "删除标识，0:未删除，1：删除不能为空", trigger: "blur" }
          ],
          createUserid: [
            { required: true, message: "创建用户ID不能为空", trigger: "blur" }
          ],
          createTime: [
            { required: true, message: "创建时间不能为空", trigger: "blur" }
          ],
          updateUserid: [
            { required: true, message: "更新用户ID不能为空", trigger: "blur" }
          ],
          updateTime: [
            { required: true, message: "更新时间不能为空", trigger: "blur" }
          ],
        },
        form:{},
        // 遮罩层
        loading: true,
        // 选中数组
        ids: [],
        // 非单个禁用
        single: true,
        // 非多个禁用
        multiple: true,
        // 显示搜索条件
        showSearch: true,
        // 总条数
        total: 0,
        // 【请填写功能名称】表格数据
        contractList: [],
        // 弹出层标题
        title: "",
        // 是否显示弹出层
        open: false,
        // 查询参数
        queryParams: {
          pageNum: 1,
          pageSize: 10,
          sfContractNo: null,
          lastContractId: null,
          lastContractNo: null,
          businessId: null,
          premiseName: null,
          houseId: null,
          houseTitle: null,
          houseZsNo: null,
          cqAddress: null,
          ownerId: null,
          ownerName: null,
          ownerIdCard: null,
          ownerMobile: null,
          signUserName: null,
          signUserIdCard: null,
          signUserMobile: null,
          signUserEmergencyPhone: null,
          leaseStartTime: null,
          leaseEndTime: null,
          monthRent: null,
          depositMoney: null,
          depositType: null,
          paymentType: null,
          conSignTime: null,
          conInfoTime: null,
          conAudTime: null,
          operId: null,
          sfUserId: null,
          sfUserName: null,
          status: null,
          xyStatus: null,
          sfLoanFlg: null,
          reserve1: null,
          reserve2: null,
          reserve3: null,
          reserve4: null,
          reserve5: null,
          delFlg: null,
          createUserid: null,
          updateUserid: null,
          houseLeaseType: null
        },
      };
    },
    created() {
      this.getList();
    },
    methods: {
      /** 查询【请填写功能名称】列表 */
      getList() {
        this.loading = true;
        owner(this.queryParams).then(response => {
          this.contractList = response.rows;
          this.total = response.total;
          this.loading = false;
        });
      },
      // 取消按钮
      cancel() {
        this.open = false;
        this.reset();
      },
      // 表单重置
      reset() {
        this.form = {
          id: null,
          sfContractNo: null,
          lastContractId: null,
          lastContractNo: null,
          businessId: null,
          premiseName: null,
          houseId: null,
          houseTitle: null,
          houseZsNo: null,
          cqAddress: null,
          ownerId: null,
          ownerName: null,
          ownerIdCard: null,
          ownerMobile: null,
          signUserName: null,
          signUserIdCard: null,
          signUserMobile: null,
          signUserEmergencyPhone: null,
          leaseStartTime: null,
          leaseEndTime: null,
          monthRent: null,
          depositMoney: null,
          depositType: null,
          paymentType: null,
          conSignTime: null,
          conInfoTime: null,
          conAudTime: null,
          operId: null,
          sfUserId: null,
          sfUserName: null,
          status: 0,
          xyStatus: 0,
          sfLoanFlg: null,
          remark: null,
          reserve1: null,
          reserve2: null,
          reserve3: null,
          reserve4: null,
          reserve5: null,
          delFlg: null,
          createUserid: null,
          createTime: null,
          updateUserid: null,
          updateTime: null,
          houseLeaseType: null
        };
        this.resetForm("form");
      },
      /** 搜索按钮操作 */
      handleQuery() {
        this.queryParams.pageNum = 1;
        this.getList();
      },
      /** 重置按钮操作 */
      resetQuery() {
        this.resetForm("queryForm");
        this.handleQuery();
      },
      // 多选框选中数据
      handleSelectionChange(selection) {
        this.ids = selection.map(item => item.id)
        this.single = selection.length!==1
        this.multiple = !selection.length
      },
      /** 新增按钮操作 */
      // handleAdd() {
      //   // this.reset();
      //   // this.open = true;
      //   // this.title = "添加【请填写功能名称】";
      //   this.$router.push({path:"/contract/add"})
      // },

      /** 修改按钮操作 */
      // handleUpdate(row) {
      //   this.reset();
      //   const id = row.id || this.ids
      //   getContract(id).then(response => {
      //     this.form = response.data;
      //     this.open = true;
      //     this.title = "修改【请填写功能名称】";
      //   });
      // },
      /** 提交按钮 */
      // submitForm() {
      //   this.$refs["form"].validate(valid => {
      //     if (valid) {
      //       if (this.form.id != null) {
      //         updateContract(this.form).then(response => {
      //           this.$modal.msgSuccess("修改成功");
      //           this.open = false;
      //           this.getList();
      //         });
      //       } else {
      //         addContract(this.form).then(response => {
      //           this.$modal.msgSuccess("新增成功");
      //           this.open = false;
      //           this.$router.push({path:"/contract/index"})
      //         });
      //       }
      //     }
      //   });
      // },
      // /** 删除按钮操作 */
      // handleDelete(row) {
      //   const ids = row.id || this.ids;
      //   this.$modal.confirm('是否确认删除【请填写功能名称】编号为"' + ids + '"的数据项？').then(function() {
      //     return delContract(ids);
      //   }).then(() => {
      //     this.getList();
      //     this.$modal.msgSuccess("删除成功");
      //   }).catch(() => {});
      // },
      // /** 导出按钮操作 */
      // handleExport() {
      //   this.download('contract/contract/export', {
      //     ...this.queryParams
      //   }, `contract_${new Date().getTime()}.xlsx`)
      // },
      // getDownload(index,row){
      //   this.download('contract/contract/download?id='+row.id, {
      //     ...this.queryParams
      //   }, `contract_${new Date().getTime()}.pdf`)
      // }
    }
  };
</script>
